package cn.gok.hotelback.service.impl;

import cn.gok.hotelback.entity.HotelInfo;
import cn.gok.hotelback.mapper.HotelInfoMapper;
import cn.gok.hotelback.service.HotelInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HotelInfoServiceImpl implements HotelInfoService {
    
    @Autowired
    private HotelInfoMapper hotelInfoMapper;
    
    @Override
    public List<HotelInfo> getAllHotelInfo() {
        return hotelInfoMapper.selectAll();
    }
    
    @Override
    public HotelInfo getHotelInfoById(Integer id) {
        return hotelInfoMapper.selectById(id);
    }
    
    @Override
    public HotelInfo getHotelInfo() {
        return hotelInfoMapper.selectFirst();
    }
} 